package com.whq.mvc.base.designpattern.state;

public class ConnectMachine {

    private ConnectState initState;
    private ConnectState connectingState;
    private ConnectState reconnectState;
    private ConnectState disConnectState;
    private ConnectState connectSuccessState;
    private ConnectState connectFailureState;

    public ConnectMachine() {
    }

    public void doConnect(){
        initState.handleRequest();
    }

    public void waitingConnect(){
        connectingState.handleRequest();
    }

    public void reConnect(){
        reconnectState.handleRequest();
    }

    public void disConnect(){
        disConnectState.handleRequest();
    }

    public void connectSuccess(){
        connectSuccessState.handleRequest();
    }

    public void connectFailure(){
        connectFailureState.handleRequest();
    }
}
